package com.yc.booktable.controller;


import com.yc.booktable.entity.AdminUser;
import com.yc.booktable.entity.Bookinfo;
import com.yc.booktable.service.IBookinfoService;
import com.yc.booktable.vo.Result;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.sql.Date;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zbh
 * @since 2022-06-06
 */
@Controller
public class BookinfoController {
    @Resource
    private IBookinfoService bookinfoService;
    @PostMapping("book")
    @ResponseBody
    public Result book(Date time, String people, String message, HttpSession session){
        return bookinfoService.add(time,people,message,session);
    }
}

